/** 
 * @COPY; COPYRIGHT 2008-2009 Matt Young, Garrett McLeod, Ben Bowden - All Rights reserved. 
 */
package com.macbulldev.poc.testgin.jee;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import net.youngdev.util.Context;

import org.apache.log4j.Logger;


/**
 * This class sets up the Context so non-JEE classes have 
 * access to the Application Context.
 * @author solid
 *
 */
public class AppInitializer implements ServletContextListener
{
    
    private static final Logger LOGGER = Logger.getLogger( AppInitializer.class );

    
    public void contextInitialized( ServletContextEvent event )
    {
        Context ctx = net.youngdev.util.Context.getInstance(); 
        ctx.setContext( event.getServletContext() );      
        
    }
    
    public void contextDestroyed( ServletContextEvent event )
    {
    }
}
